/**
 * 
 */
package org.gov.vis.master.gui;

import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.gov.vis.components.VISTextField;
import org.gov.vis.gui.VisBaseDialog;
import org.gov.vis.gui.util.GuiUtil;
import org.gov.vis.master.gui.listener.EditGopalaMithraListener;
import org.gov.vis.util.DBConstants;

import com.toedter.calendar.JDateChooser;

/**
 * @author user
 *
 */
public class EditGopalaMithraDialog extends VisBaseDialog{



	/**
	 * 
	 */
	private static final long serialVersionUID = -7212722633391944150L;
	private JPanel gopalaMithraMainPanel;
	private VISTextField txtbxName;
	private VISTextField txtbxCode;
	private JLabel lblJurisdiction;
	private JButton saveBtn;
	private JPanel pnlMessages;
	private JButton resetBtn;
	private JPanel buttonsPnl;
	private VISTextField jTextField1;
	private VISTextField judMandalTxtBx;
	private VISTextField headQuarterTxtBx;
	private VISTextField jurisdiction;
	private VISTextField districtTxtBx;
	private VISTextField mandalTxtBx;
	private VISTextField dobTxtBx;
	private VISTextField nativeVillageTxtBx;
	private VISTextField fatherTxtBx;
	private JLabel lblHQDistrict;
	private JLabel lblHQMandal;
	private JLabel lblHeadQuarter;
	private JLabel lblDistrict;
	private JLabel lblMandal;
	private JLabel lblNativeVillage;
	private JLabel lblDateOfBirth;
	private JLabel lblFatherName;
	private JLabel lblName;
	private JLabel lblCode;
	private JDateChooser dtChoDateOfBirth;
	private Object hidnObject;
	private String searchText;

	public EditGopalaMithraDialog(Frame owner, String title, boolean modal){
		super(owner, title, modal);
		initGUI();
		GuiUtil.CompCenterCords cords=GuiUtil.getCompCenterCords(500, 550);
		setBounds(cords.getX(), cords.getY(), 500, 550);		
		//setVisible(true);
	}
	
	private void initGUI() {
		try {					
			GridBagLayout thisLayout = new GridBagLayout();
			thisLayout.rowWeights = new double[] {0.1};
			thisLayout.rowHeights = new int[] {7};
			thisLayout.columnWeights = new double[] {0.1};
			thisLayout.columnWidths = new int[] {7};
			getContentPane().setLayout(thisLayout);

			this.setSize(500, 550);
			{
				gopalaMithraMainPanel = new JPanel();
				GridBagLayout jPanel1Layout = new GridBagLayout();
				jPanel1Layout.columnWidths = new int[] {7, 7, 7, 7, 7};
				jPanel1Layout.rowHeights = new int[] {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
				jPanel1Layout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.1, 0.0};
				jPanel1Layout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
				getContentPane().add(gopalaMithraMainPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
				gopalaMithraMainPanel.setLayout(jPanel1Layout);
				{
					
					lblFatherName = new JLabel();
					gopalaMithraMainPanel.add(lblFatherName, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblFatherName.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_fathername"), true));
				}
				{
					lblCode = new JLabel();
					gopalaMithraMainPanel.add(lblCode, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblCode.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_code"), true));
				}
				{
					lblName = new JLabel();
					gopalaMithraMainPanel.add(lblName, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblName.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_name"), true));
				}
				{
					txtbxCode = new VISTextField();
					gopalaMithraMainPanel.add(txtbxCode, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					txtbxName = new VISTextField();
					gopalaMithraMainPanel.add(txtbxName, new GridBagConstraints(3, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					lblDateOfBirth = new JLabel();
					gopalaMithraMainPanel.add(lblDateOfBirth, new GridBagConstraints(1, 7, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblDateOfBirth.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_dob"), true));
				}
				{
					lblNativeVillage = new JLabel();
					gopalaMithraMainPanel.add(lblNativeVillage, new GridBagConstraints(1, 9, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 30, 0, 0), 0, 0));
					lblNativeVillage.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_nv"), false));
				}
				{
					lblMandal = new JLabel();
					gopalaMithraMainPanel.add(lblMandal, new GridBagConstraints(1, 11, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblMandal.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_mandal"), false));
				}
				{
					lblDistrict = new JLabel();
					gopalaMithraMainPanel.add(lblDistrict, new GridBagConstraints(1, 13, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblDistrict.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_district"), false));
				}
				{
					lblJurisdiction = new JLabel();
					gopalaMithraMainPanel.add(lblJurisdiction, new GridBagConstraints(1, 15, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblJurisdiction.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_jurid"), false));
				}
				{
					lblHeadQuarter = new JLabel();
					gopalaMithraMainPanel.add(lblHeadQuarter, new GridBagConstraints(1, 17, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblHeadQuarter.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_hqc"), false));
				}
				{
					lblHQMandal = new JLabel();
					gopalaMithraMainPanel.add(lblHQMandal, new GridBagConstraints(1, 19, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblHQMandal.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_hqmandal"), false));
				}
				{
					lblHQDistrict = new JLabel();
					gopalaMithraMainPanel.add(lblHQDistrict, new GridBagConstraints(1, 21, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblHQDistrict.setText(setFieldLabel(getResources().getString("dialog_label_gopmit_hqdistrict"), false));
				}
				{
					fatherTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(fatherTxtBx, new GridBagConstraints(3, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					nativeVillageTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(nativeVillageTxtBx, new GridBagConstraints(3, 9, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					//dobTxtBx = new VISTextField();
				//	gopalaMithraMainPanel.add(dobTxtBx, new GridBagConstraints(3, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				
					dtChoDateOfBirth = new JDateChooser(null,DBConstants.DISPLAY_DATE_FORMAT);
					dtChoDateOfBirth.setPreferredSize(nativeVillageTxtBx.getPreferredSize());
					gopalaMithraMainPanel.add(dtChoDateOfBirth, new GridBagConstraints(3, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
			
				}
				{
					mandalTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(mandalTxtBx, new GridBagConstraints(3, 11, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					districtTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(districtTxtBx, new GridBagConstraints(3, 13, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					
				}
				{
					jurisdiction = new VISTextField();
					gopalaMithraMainPanel.add(jurisdiction, new GridBagConstraints(3, 15, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					headQuarterTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(headQuarterTxtBx, new GridBagConstraints(3, 17, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					judMandalTxtBx = new VISTextField();
					gopalaMithraMainPanel.add(judMandalTxtBx, new GridBagConstraints(3, 19, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					jTextField1 = new VISTextField();
					gopalaMithraMainPanel.add(jTextField1, new GridBagConstraints(3, 21, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					buttonsPnl = new JPanel();
					gopalaMithraMainPanel.add(buttonsPnl, new GridBagConstraints(3, 23, 3, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					{
						pnlMessages = new JPanel();
						GridBagLayout jPanel1Layout1 = new GridBagLayout();
						gopalaMithraMainPanel.add(pnlMessages, new GridBagConstraints(1, 0, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						jPanel1Layout1.rowWeights = new double[] {0.1};
						jPanel1Layout1.rowHeights = new int[] {7};
						jPanel1Layout1.columnWeights = new double[] {0.1};
						jPanel1Layout1.columnWidths = new int[] {7};
						pnlMessages.setLayout(jPanel1Layout1);
					}
					{
						saveBtn = new JButton();
						buttonsPnl.add(saveBtn);
						saveBtn.setText(getResources().getString("dialog_button_update"));
						saveBtn.addActionListener(new EditGopalaMithraListener(this));
					}
					{
						resetBtn = new JButton();
						buttonsPnl.add(resetBtn);
						resetBtn.setText(getResources().getString("dialog_button_delete"));
						resetBtn.addActionListener(new EditGopalaMithraListener(this));
					}
				}
			}

		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	public JPanel getjPanel1() {
		return pnlMessages;
	}
	/**
	 * @return the gopalaMithraMainPanel
	 */
	public JPanel getGopalaMithraMainPanel() {
		return gopalaMithraMainPanel;
	}

	/**
	 * @param gopalaMithraMainPanel the gopalaMithraMainPanel to set
	 */
	public void setGopalaMithraMainPanel(JPanel gopalaMithraMainPanel) {
		this.gopalaMithraMainPanel = gopalaMithraMainPanel;
	}

	/**
	 * @return the txtbxName
	 */
	public VISTextField getTxtbxName() {
		return txtbxName;
	}

	/**
	 * @param txtbxName the txtbxName to set
	 */
	public void setTxtbxName(VISTextField txtbxName) {
		this.txtbxName = txtbxName;
	}

	/**
	 * @return the txtbxCode
	 */
	public VISTextField getTxtbxCode() {
		return txtbxCode;
	}

	/**
	 * @param txtbxCode the txtbxCode to set
	 */
	public void setTxtbxCode(VISTextField txtbxCode) {
		this.txtbxCode = txtbxCode;
	}

	/**
	 * @return the lblJurisdiction
	 */
	public JLabel getLblJurisdiction() {
		return lblJurisdiction;
	}

	/**
	 * @param lblJurisdiction the lblJurisdiction to set
	 */
	public void setLblJurisdiction(JLabel lblJurisdiction) {
		this.lblJurisdiction = lblJurisdiction;
	}

	/**
	 * @return the saveBtn
	 */
	public JButton getSaveBtn() {
		return saveBtn;
	}

	/**
	 * @param saveBtn the saveBtn to set
	 */
	public void setSaveBtn(JButton saveBtn) {
		this.saveBtn = saveBtn;
	}

	/**
	 * @return the resetBtn
	 */
	public JButton getResetBtn() {
		return resetBtn;
	}

	/**
	 * @param resetBtn the resetBtn to set
	 */
	public void setResetBtn(JButton resetBtn) {
		this.resetBtn = resetBtn;
	}

	/**
	 * @return the buttonsPnl
	 */
	public JPanel getButtonsPnl() {
		return buttonsPnl;
	}

	/**
	 * @param buttonsPnl the buttonsPnl to set
	 */
	public void setButtonsPnl(JPanel buttonsPnl) {
		this.buttonsPnl = buttonsPnl;
	}

	/**
	 * @return the jTextField1
	 */
	public VISTextField getJTextField1() {
		return jTextField1;
	}

	/**
	 * @param textField1 the jTextField1 to set
	 */
	public void setJTextField1(VISTextField textField1) {
		jTextField1 = textField1;
	}

	/**
	 * @return the judMandalTxtBx
	 */
	public VISTextField getJudMandalTxtBx() {
		return judMandalTxtBx;
	}

	/**
	 * @param judMandalTxtBx the judMandalTxtBx to set
	 */
	public void setJudMandalTxtBx(VISTextField judMandalTxtBx) {
		this.judMandalTxtBx = judMandalTxtBx;
	}

	/**
	 * @return the headQuarterTxtBx
	 */
	public VISTextField getHeadQuarterTxtBx() {
		return headQuarterTxtBx;
	}

	/**
	 * @param headQuarterTxtBx the headQuarterTxtBx to set
	 */
	public void setHeadQuarterTxtBx(VISTextField headQuarterTxtBx) {
		this.headQuarterTxtBx = headQuarterTxtBx;
	}

	/**
	 * @return the jurisdiction
	 */
	public VISTextField getJurisdiction() {
		return jurisdiction;
	}

	/**
	 * @param jurisdiction the jurisdiction to set
	 */
	public void setJurisdiction(VISTextField jurisdiction) {
		this.jurisdiction = jurisdiction;
	}

	/**
	 * @return the districtTxtBx
	 */
	public VISTextField getDistrictTxtBx() {
		return districtTxtBx;
	}

	/**
	 * @param districtTxtBx the districtTxtBx to set
	 */
	public void setDistrictTxtBx(VISTextField districtTxtBx) {
		this.districtTxtBx = districtTxtBx;
	}

	/**
	 * @return the mandalTxtBx
	 */
	public VISTextField getMandalTxtBx() {
		return mandalTxtBx;
	}

	/**
	 * @param mandalTxtBx the mandalTxtBx to set
	 */
	public void setMandalTxtBx(VISTextField mandalTxtBx) {
		this.mandalTxtBx = mandalTxtBx;
	}

	/**
	 * @return the dobTxtBx
	 */
	public VISTextField getDobTxtBx() {
		return dobTxtBx;
	}

	/**
	 * @param dobTxtBx the dobTxtBx to set
	 */
	public void setDobTxtBx(VISTextField dobTxtBx) {
		this.dobTxtBx = dobTxtBx;
	}

	/**
	 * @return the nativeVillageTxtBx
	 */
	public VISTextField getNativeVillageTxtBx() {
		return nativeVillageTxtBx;
	}

	/**
	 * @param nativeVillageTxtBx the nativeVillageTxtBx to set
	 */
	public void setNativeVillageTxtBx(VISTextField nativeVillageTxtBx) {
		this.nativeVillageTxtBx = nativeVillageTxtBx;
	}

	/**
	 * @return the fatherTxtBx
	 */
	public VISTextField getFatherTxtBx() {
		return fatherTxtBx;
	}

	/**
	 * @param fatherTxtBx the fatherTxtBx to set
	 */
	public void setFatherTxtBx(VISTextField fatherTxtBx) {
		this.fatherTxtBx = fatherTxtBx;
	}

	/**
	 * @return the lblHQDistrict
	 */
	public JLabel getLblHQDistrict() {
		return lblHQDistrict;
	}

	/**
	 * @param lblHQDistrict the lblHQDistrict to set
	 */
	public void setLblHQDistrict(JLabel lblHQDistrict) {
		this.lblHQDistrict = lblHQDistrict;
	}

	/**
	 * @return the lblHQMandal
	 */
	public JLabel getLblHQMandal() {
		return lblHQMandal;
	}

	/**
	 * @param lblHQMandal the lblHQMandal to set
	 */
	public void setLblHQMandal(JLabel lblHQMandal) {
		this.lblHQMandal = lblHQMandal;
	}

	/**
	 * @return the lblHeadQuarter
	 */
	public JLabel getLblHeadQuarter() {
		return lblHeadQuarter;
	}

	/**
	 * @param lblHeadQuarter the lblHeadQuarter to set
	 */
	public void setLblHeadQuarter(JLabel lblHeadQuarter) {
		this.lblHeadQuarter = lblHeadQuarter;
	}

	/**
	 * @return the lblDistrict
	 */
	public JLabel getLblDistrict() {
		return lblDistrict;
	}

	/**
	 * @param lblDistrict the lblDistrict to set
	 */
	public void setLblDistrict(JLabel lblDistrict) {
		this.lblDistrict = lblDistrict;
	}

	/**
	 * @return the lblMandal
	 */
	public JLabel getLblMandal() {
		return lblMandal;
	}

	/**
	 * @param lblMandal the lblMandal to set
	 */
	public void setLblMandal(JLabel lblMandal) {
		this.lblMandal = lblMandal;
	}

	/**
	 * @return the lblNativeVillage
	 */
	public JLabel getLblNativeVillage() {
		return lblNativeVillage;
	}

	/**
	 * @param lblNativeVillage the lblNativeVillage to set
	 */
	public void setLblNativeVillage(JLabel lblNativeVillage) {
		this.lblNativeVillage = lblNativeVillage;
	}

	/**
	 * @return the lblDateOfBirth
	 */
	public JLabel getLblDateOfBirth() {
		return lblDateOfBirth;
	}

	/**
	 * @param lblDateOfBirth the lblDateOfBirth to set
	 */
	public void setLblDateOfBirth(JLabel lblDateOfBirth) {
		this.lblDateOfBirth = lblDateOfBirth;
	}

	/**
	 * @return the lblFatherName
	 */
	public JLabel getLblFatherName() {
		return lblFatherName;
	}

	/**
	 * @param lblFatherName the lblFatherName to set
	 */
	public void setLblFatherName(JLabel lblFatherName) {
		this.lblFatherName = lblFatherName;
	}

	/**
	 * @return the lblName
	 */
	public JLabel getLblName() {
		return lblName;
	}

	/**
	 * @param lblName the lblName to set
	 */
	public void setLblName(JLabel lblName) {
		this.lblName = lblName;
	}

	/**
	 * @return the lblCode
	 */
	public JLabel getLblCode() {
		return lblCode;
	}

	/**
	 * @param lblCode the lblCode to set
	 */
	public void setLblCode(JLabel lblCode) {
		this.lblCode = lblCode;
	}

	/**
	 * @return the dtChoDateOfBirth
	 */
	public JDateChooser getDtChoDateOfBirth() {
		return dtChoDateOfBirth;
	}

	/**
	 * @param dtChoDateOfBirth the dtChoDateOfBirth to set
	 */
	public void setDtChoDateOfBirth(JDateChooser dtChoDateOfBirth) {
		this.dtChoDateOfBirth = dtChoDateOfBirth;
	}

	/**
	 * @return the hidnObject
	 */
	public Object getHidnObject() {
		return hidnObject;
	}

	/**
	 * @param hidnObject the hidnObject to set
	 */
	public void setHidnObject(Object hidnObject) {
		this.hidnObject = hidnObject;
	}

	/**
	 * @return the searchText
	 */
	public String getSearchText() {
		return searchText;
	}

	/**
	 * @param searchText the searchText to set
	 */
	public void setSearchText(String searchText) {
		this.searchText = searchText;
	}

	/**
	 * 
	 */
	//private static final long serialVersionUID = -685340117992436081L;

	
	



}
